<?php
namespace app\api\model;

use think\Model;

class GoodsModel extends Model
{
    protected $table = 'gms_good_goods';

    public function space()
    {
        return $this->belongsTo('app\api\model\GoodSpace', 'space_id', 'id')
                        ->bind(['space_title' => 'title']);
    }
    public function cate()
    {
        return $this->belongsTo('app\api\model\GoodCate', 'cate_id', 'id')
            ->bind(['cate_title' => 'title']);
    }

}


